/**
 * @Date 2023-02-09 17:14:09
 * @Remark
 */

// config
// state
import { DashboardAdminData, DashboardUserData } from "biz/Dashboard/api";
import { makeAutoObservable, toJS } from "mobx";
// controller
// script & methods & public
// 其它

export interface SearchValue {
  name?: string;
}

class State {
  adminHomeData: DashboardAdminData  | undefined;
  userHomeData: DashboardUserData | undefined
  hotBorrow:BookDto[] = []
  hotOrder:BookDto[] = []
  constructor() {
    makeAutoObservable(this);
  }
  getAdminHomeData() {
    return toJS(this.adminHomeData);
  }
  getUserHomeData() {
    return toJS(this.userHomeData);
  }
  getHotBorrow(){
    return toJS(this.hotBorrow)
  }
  getHotOrder(){
    return toJS(this.hotOrder)
  }
}

export const state = new State();
